<?php

/*
  VoIP Wholesale 1.0
  ------------------
  Document   : module_external_add
  Created on : Sep 16, 2011, 10:14:02 AM
  Author     : Milos Jovanovic <miloscode@gmail.com>
  Description:

 */
?>
<div id="page-title"><?=lang('term_internal_numbering_plan')?> :: <?=lang('text_close_route')?></div>

<div id="page-desc"><?=lang('text_close_route_desc')?></div>

<div class="ui-widget"> 
    <div id="content">
        <div class="module-options">
            <button id="module-add-new-internal"><?=lang('button_add_new_entry')?></button>
            <button id="module-export-xls"><?=lang('button_export_xls')?></button>
            <button id="module-import-xls"><?=lang('button_import_xls')?></button>
        </div>

        <fieldset>
        <!-- PAGE CONTENT -->
	<form action="" method="post" id="new-route" onsubmit="return false;"> 
		<label for="name"><?=lang('term_route_name')?></label> 
		<input type="text" name="data[route_name]" value="<?=$route['name']?>" id="route-name" class="text ui-widget-content ui-corner-all deactivated" /> 
                
                <label for="dialling-codes"><?=lang('term_dialling_code_s')?></label> 
				<textarea name="data[dialling_codes]" id="dialling-codes" class="module-textarea deactivated"><?=$route['dialling_code']?></textarea>
				
				<p>
					<label for="type"><?=lang('term_route_type')?></label>
					<select name="data[type]" id="type" class="ui-state-disabled deactivated">
						<?php if($route['type'] == "proper"){?><option value="proper" ><?=lang('term_proper_route')?></option><?php }?>
						<?php if($route['type'] == "mobile"){?><option value="mobile" ><?=lang('term_mobile_route')?></option><?php }?>
					</select>
				</p>
		 
                <p>
                    <label for="date-from"><?=lang('term_date_from')?></label>
                    <input type="text" name="data[date_from]" value="<?=date('Y-m-d',strtotime($route['start_date']))?>" class="deactivated"/>
                </p>
                		
                <p>
                    <label for="date-to"><?=lang('term_date_to')?></label> 
                    <input type="text" name="data[date_to]" value="<?=date("Y-m-d",time())?>" class="deactivated"/>
					<input type="hidden" name="data[confirm]" id="confirm" value="false"/>
					<input type="hidden" name="data[route_id]" id="confirm" value="<?=$route['id']?>"/>
                </p>
                
                <div id="response"></div><br />
                <button id="module-close-route"><?=lang('button_close_route')?></button>
	</form> 
        </fieldset>
    </div>    
</div>  
<!-- MODAL FORM -->
<div id="close-confirmation-box" title="<?=lang('text_confirm_closing_routes')?>"> 
	<p id="routes"></p>
</div>  
